home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / RTLWIN16.PAK / LZEXPAND.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  4KB  |  99 lines

  1. /* $Copyright: 1994$ */
  2.  
  3. /*****************************************************************************\
  4. *                                                                             *
  5. * lzexpand.h    Public interfaces for LZEXPAND.DLL.                           *
  6. *                                                                             *
  7. *               Version 3.10                                                  *
  8. *                                                                             *
  9. *               NOTE: windows.h must be included first if LIB is NOT #defined *
  10. *                                                                             *
  11. *******************************************************************************
  12. *
  13. * #define LIB   - To be used with LZEXP?.LIB (default is for LZEXPAND.DLL)
  14. *                 NOTE: Not compatible with windows.h if LIB is #defined
  15. *
  16. \*****************************************************************************/
  17.  
  18. #ifndef __LZEXPAND_H    /* prevent multiple includes */
  19. #define __LZEXPAND_H
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {            /* Assume C declarations for C++ */
  23. #endif  /* __cplusplus */
  24.  
  25. #if !defined(__WINDOWS_H) && !defined(LIB)
  26. #include <windows.h>    /* <windows.h> must be included */
  27. #endif  /* __WINDOWS_H */
  28.  
  29. /*
  30.  * If .lib version is being used, declare types used in this file.
  31.  */
  32. #ifdef LIB
  33.  
  34. #define LZAPI           _pascal
  35.  
  36. #ifndef WINAPI          /* don't declare if they're already declared */
  37. #define WINAPI          _far _pascal
  38. #define NEAR            _near
  39. #define FAR             _far
  40. #define PASCAL          _pascal
  41. typedef int             BOOL;
  42. #define TRUE            1
  43. #define FALSE           0
  44. typedef unsigned char   BYTE;
  45. typedef unsigned short  WORD;
  46. typedef unsigned int    UINT;
  47. typedef signed long     LONG;
  48. typedef unsigned long   DWORD;
  49. typedef char far*       LPSTR;
  50. typedef const char far* LPCSTR;
  51. typedef int             HFILE;
  52. #define OFSTRUCT        void            /* Not used by the .lib version */
  53. #endif  /* WINAPI */
  54.  
  55. #else   /* LIB */
  56.  
  57. #define LZAPI           _far _pascal
  58.  
  59. /* If included with the 3.0 windows.h, define compatible aliases */
  60. #if !defined(WINVER) || (WINVER < 0x030a)
  61. #define UINT        WORD
  62. #define LPCSTR      LPSTR
  63. #define HFILE       int
  64. #endif  /* WIN3.0 */
  65.  
  66. #endif  /* !LIB */
  67.  
  68. /****** Error return codes ***************************************************/
  69.  
  70. #define LZERROR_BADINHANDLE   (-1)  /* invalid input handle */
  71. #define LZERROR_BADOUTHANDLE  (-2)  /* invalid output handle */
  72. #define LZERROR_READ          (-3)  /* corrupt compressed file format */
  73. #define LZERROR_WRITE         (-4)  /* out of space for output file */
  74. #define LZERROR_GLOBALLOC     (-5)  /* insufficient memory for LZFile struct */
  75. #define LZERROR_GLOBLOCK      (-6)  /* bad global handle */
  76. #define LZERROR_BADVALUE      (-7)  /* input parameter out of range */
  77. #define LZERROR_UNKNOWNALG    (-8)  /* compression algorithm not recognized */
  78.  
  79. /****** Public functions *****************************************************/
  80.  
  81. int     LZAPI LZStart(void);
  82. void    LZAPI LZDone(void);
  83. LONG    LZAPI CopyLZFile(HFILE, HFILE);
  84. LONG    LZAPI LZCopy(HFILE, HFILE);
  85. HFILE   LZAPI LZInit(HFILE);
  86. int     LZAPI GetExpandedName(LPCSTR, LPSTR);
  87. HFILE   LZAPI LZOpenFile(LPCSTR, OFSTRUCT FAR*, UINT);
  88. LONG    LZAPI LZSeek(HFILE, LONG, int);
  89. int     LZAPI LZRead(HFILE, void FAR*, int);
  90. void    LZAPI LZClose(HFILE);
  91.  
  92. #ifdef __cplusplus
  93. }       /* End of extern "C" { */
  94. #endif  /* __cplusplus */
  95.  
  96.  
  97. #endif // _LZEXPAND_INCLUDED_
  98.  
  99.